const {defineConfig} = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true
})

const path = require('path');

module.exports = {
    devServer: {
        proxy: {
            '/api': {
                target: 'http://localhost:8080',
                changeOrigin: true,
                pathRewrite: {
                    '^/api': '/mock'
                }
            },
            '/server': {
                target: 'http://localhost:8880',
                changeOrigin: true,
                ws: true
            }
        }
    },
    chainWebpack: (config) => {
        config.resolve.alias
            .set('styles', path.join(__dirname, './src/assets/styles'))
            .set('@', path.join(__dirname, './src/'))
            .set('common', path.join(__dirname, './src/common'))
    }
}
